package com.poly.police.monitor.admin.controller.sys;


import com.poly.police.monitor.admin.aop.Log;
import com.poly.police.monitor.application.service.sys.ISysCacheService;
import com.poly.police.monitor.common.core.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("api/sys/cache")
@Api(tags = "系统缓存管理")
public class SysCacheController {

    @Resource
    ISysCacheService iSysCacheService;

    @Log(title = "清除系统缓存")
    @PostMapping("/clear")
    @ApiOperation(value = "清除系统缓存")
    public AjaxResult<Object> clear() {
        iSysCacheService.clear();
        return AjaxResult.success();
    }


}
